package com.hundsun.cprs.yyt.service.dilivery.service;

import com.hundsun.cprs.yyt.common.exception.ServiceCodeException;
import com.hundsun.cprs.yyt.service.dilivery.domain.DiliveryAddress;
import com.hundsun.cprs.yyt.service.dilivery.domain.query.AddressQuery;

import java.util.List;

public interface DiliveryAddressService {
	/*
	 * 新增提货地址
	 * @param diliveryAddress
	 *
	 * */
	public void createDiliveryAddress(DiliveryAddress diliveryAddress) throws ServiceCodeException;

	/*
	 * 修改提货地址
	 * @param diliveryAddress
	 *
	 * */
	public void modifiyDiliveryAddress(DiliveryAddress diliveryAddress) throws ServiceCodeException;

	/*
	 * 删除提货地址
	 * @param userId，addressId
	 *
	 * */
	public void deleteDiliveryAddress(Long userId, Long addressId) throws ServiceCodeException;

	/*
	 * 设置提货地址为默认地址
	 * @param userId,addressId
	 *
	 * */
	public void alterDiliveryAddressToDefault(Long userId, Long addressId) throws ServiceCodeException;

	/*
	 * 查询个人所有的提货地址
	 * @param userId
	 * return List<DiliveryAddress>
	 *
	 * */
	public List<DiliveryAddress> selectAddressListByUserId(Long userId);

	/*
	 * 查询个人的默认地址
	 * @param userId
	 * return DiliveryAddress
	 *
	 * */
	public DiliveryAddress selectDefaultAddressByUserId(Long userId);

	/*
	 * 根据addressId查询地址的详细信息
	 * @param addressId
	 * return DiliveryAddress
	 *
	 * */
	public DiliveryAddress selectAddressDetailByAddressId(Long addressId);

	public void queryAddressByPage(AddressQuery query);
}
